import { RouteConfig } from "vue-router";
import Layout from "@/layout/index.vue";

const tenantRouter: RouteConfig = {
  path: "/tenant",
  component: Layout,
  redirect: "/tenant/index",
  name: "Tenant",
  meta: {
    title: "tenantManage",
    authrole: 'system_admin',
    routerRuleName: "Tenant"
  },
  children: [
    {
      path: "index",
      component: () => import("@/views/tenant/tenant.vue"),
      name: "TenantManageIndex",
      meta: {
        title: "tenantManage",
        noCache: true,
        authrole: 'system_admin',
        routerRuleName: "TenantManageIndex"
      }
    },
    {
      path: "detail",
      component: () => import("@/views/tenant/tenant_detail.vue"),
      name: "TenantManageDetail",
      meta: {
        title: "tenantManageDetail",
        noCache: true,
        hidden: true,
        authrole: 'system_admin'
      }
    }
  ]
};

export default tenantRouter;
